File:Plot of x^y = y^x.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 419 × 424 pixels, file size: 45 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: The boundary of the blue and white regions are the points where xy=yx. The blue region corresponds to xy>yx and the white region corresponds to xy<yx. The bottom blue curve can be written explicitly by the expression exp⁡(−W0(−ln⁡x/x)), where W0 is the Lambert W function. The top green curve is exp⁡(−W−1(−ln⁡x/x)), and the dashed black curve is y=x. From the plot, we can see that 2π<π2 and eπ>πe.
    Date
    Source Own work
    Author Hugo Spinelli
    Other versions Plot of x^y = y^x.png
    SVG development
    InfoField
     The SVG code is valid.
     This vector image was created with Inkscape.
    Source code
    InfoField
    Try it here (permalink). Cleaned up with Inkscape afterwards.
    SageMath code
    var('x y')
    f = x^y-y^x
    max_x, max_y = 8, 8
    range_x = (x, 0.01, max_x)
    range_y = (y, 0.01, max_y)
    
    p = plot([], dpi=150, gridlines=False)
    p += region_plot(f>0, range_x, range_y, incol='lightblue', bordercol='gray', axes_labels=['$x$','$y$'])
    e = exp(1)
    p += text('$x^y > y^x$', [3.5, 5], rgbcolor='dimgray', fontsize='large')
    p += text('$x^y > y^x$', [3.5, 1], rgbcolor='dimgray', fontsize='large')
    p += text('$x^y < y^x$', [1.0, 4], rgbcolor='dimgray', fontsize='large')
    p += text('$x^y < y^x$', [6.0, 4], rgbcolor='dimgray', fontsize='large')
    
    point1 = (exp(1), pi)
    point2 = (2, pi)
    point3 = (exp(1), exp(1))
    
    p += scatter_plot([point1], markersize=25, edgecolor='gray', facecolor='lightgray')
    p += text(r'$(e,\,\pi)$', (point1[0], point1[1] + .25), fontsize='medium', rgbcolor='gray')
    
    p += scatter_plot([point2], markersize=25, edgecolor='gray', facecolor='lightgray')
    p += text(r'$(2,\,\pi)$', (point2[0] - .1, point2[1] + .25), fontsize='medium', rgbcolor='gray')
    
    p += scatter_plot([point3], facecolor='red')
    p += text(r'$(e,\,e)$', (point3[0], point3[1] - .5), fontsize='large', rgbcolor='black')
    
    g_latex = r'$y = \exp\left(-W_0\left(\frac{-\ln x}{x}\right)\right)$'
    g = lambda x: exp(-lambert_w(0, -ln(x)/x))
    h_latex = r'$y = \exp\left(-W_{-1}\left(\frac{-\ln x}{x}\right)\right)$'
    h = lambda x: exp(-lambert_w(-1, -ln(x)/x))
    p += plot(g, range_x, thickness=2)
    p += plot(h, (N(g(8)), 8), thickness=2, color='green')
    p += text(g_latex, (6.2, 2.2), fontsize='x-large')
    p += text(h_latex, (3.6, 7.0), fontsize='x-large', color='green')
    p += text('$y = x$', (7.2, 6.4), fontsize='xx-large', color='black')
    p += plot(x, range_x, linestyle=':', thickness=1, color='black')
    
    show(p)
    p.save('Plot_of_x^y_=_y^x.svg')
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
    The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

    Captions

    Plot of equation x^y = y^x with inequility regions highlighted.

    30 September 2023

    image/svg+xml

    46,488 byte

    0455d8f3a57dbe14fdf4c9fbcd56cbb676694c95

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current13:07, 30 September 2023Thumbnail for version as of 13:07, 30 September 2023419 × 424 (45 KB)wikimediacommons>Hugo SpinelliUploaded own work with UploadWizard

    There are no pages that use this file.